/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bonc.common.security.controller;

import com.bonc.common.security.entity.MenuResource;
import com.bonc.common.security.service.MenuResourceService;
import com.bonc.common.security.service.MenuResourceService2;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author song
 */
@RestController
@RequestMapping(value = "/api/menuResource2")
public class MenuResourceRestController2 {
    
     @Autowired
    private MenuResourceService2 menuResourceService2;
     
   /**
     * 列出所有菜单资源
     *
     * @return
     */
    @RequestMapping(method = RequestMethod.GET)
    public List<MenuResource> get(String loginId) {
       
       
        return getMenuResourceService2().getAccessedMenu(loginId);

    }

    /**
     * @return the menuResourceService2
     */
    public MenuResourceService2 getMenuResourceService2() {
        return menuResourceService2;
    }

    /**
     * @param menuResourceService2 the menuResourceService2 to set
     */
    public void setMenuResourceService2(MenuResourceService2 menuResourceService2) {
        this.menuResourceService2 = menuResourceService2;
    }
    
}
